package com.shujia.redis;

import org.junit.Before;
import org.junit.Test;
import redis.clients.jedis.Jedis;

import java.util.List;

public class Demo3List {


    Jedis jedis;

    @Before
    public void init() {

        //1、创建链接
        jedis = new Jedis("master", 6379);

    }


    @Test
    public void test1() {
        while (true) {
            List<String> l2 = jedis.blpop(0, "l2");
            System.out.println(l2);
        }
    }


}
